<template>
    <div class="pageTitle">
        <div class="pagename">
            <span v-for="(item, index) in $route.meta.list" :key="index" class="nameitem"> {{ item }} <span>/</span> </span>{{ $route.meta.title }}
        </div>
        <div class="pagetechnology">
            <div class="pagetechnologyname">云上农场平台提供技术服务</div>
            <div class="pagetitlelink" v-if="type == '1'">
                <el-icon><QuestionFilled /></el-icon> 帮助
            </div>
            <div class="pagetitlelink" v-if="type == '2'">
                <el-image :src="require('../assets/image/title1.png')" class="title1img" fit="cover"></el-image>
                文档
            </div>
        </div>
    </div>
</template>
<script lang="ts" setup>
import { defineProps, computed } from "vue";
interface Props {
    type?: string;
}
const props = withDefaults(defineProps<Props>(), {
    // 默认1
    type: "1",
});
</script>
<style lang="scss" scoped>
.pageTitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    .pagename {
        font-size: 14px;
        font-weight: 500;
        color: #333333;
        .nameitem {
            color: #999999;
            span {
                margin-right: 5px;
            }
        }
    }
    .pagetechnology {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .pagetechnologyname {
            padding-right: 40px;
            position: relative;
            color: #299c37;
            cursor: pointer;
            font-size: 12px;
            &::after {
                width: 1px;
                height: 16px;
                background: #d9d9d9;
                content: "";
                position: absolute;
                right: 20px;
                top: 50%;
                transform: translateY(-50%);
            }
        }
        .pagetitlelink {
            font-size: 12px;
            font-weight: 400;
            color: #666666;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            i {
                color: #333333;
                font-size: 16px;
                margin-right: 5px;
            }
            .title1img {
                width: 18px;
                height: 18px;
                margin-right: 5px;
            }
        }
    }
}
</style>
